﻿<ResourceDictionary
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:PresentationOptions="http://schemas.microsoft.com/winfx/2006/xaml/presentation/options" 
    xmlns:local="clr-namespace:Probel.Ldoc.Views">
    
    <Style TargetType="HeaderedContentControl">
        <Setter Property="FontFamily" Value="Segoe UI"/>
        <Setter Property="Margin" Value="5"/>
        <Setter Property="Background" Value="White" />
        <Setter Property="Padding" Value="4" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type HeaderedContentControl}">
                    <DockPanel LastChildFill="True">
                        <Border DockPanel.Dock="Top" Padding="4" Background="#465A7D" CornerRadius="3,3,0,0">
                            <ContentControl HorizontalAlignment="Center" Foreground="#CCFFFFFF" Content="{TemplateBinding Header}" ContentTemplate="{TemplateBinding HeaderTemplate}" />
                        </Border>

                        <Border Background="{TemplateBinding Background}" Padding="{TemplateBinding Padding}" CornerRadius="0,0,2,2">
                            <ContentControl Content="{TemplateBinding Content}" ContentTemplate="{TemplateBinding ContentTemplate}" />
                        </Border>
                    </DockPanel>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <!-- Default style for buttons with a border and rounded corners -->
    <Style TargetType="Button">
        <Setter Property="Margin" Value="5"/>
        <Setter Property="Width" Value="Auto"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type ButtonBase}">
                    <Border x:Name="border" BorderBrush="{TemplateBinding BorderBrush}" 
                            BorderThickness="{TemplateBinding BorderThickness}" 
                            Background="{TemplateBinding Background}" 
                            SnapsToDevicePixels="True" 
                            CornerRadius="4">
                        <ContentPresenter x:Name="contentPresenter" ContentTemplate="{TemplateBinding ContentTemplate}" Content="{TemplateBinding Content}" ContentStringFormat="{TemplateBinding ContentStringFormat}" Focusable="False" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" Margin="{TemplateBinding Padding}" RecognizesAccessKey="True" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
                    </Border>
                    <ControlTemplate.Triggers>
                        <Trigger Property="Button.IsDefaulted" Value="True">
                            <Setter Property="BorderBrush" TargetName="border" Value="{DynamicResource {x:Static SystemColors.HighlightBrushKey}}"/>
                        </Trigger>
                        <Trigger Property="IsMouseOver" Value="True">
                            <Setter Property="Background" TargetName="border" Value="#FFBEE6FD"/>
                            <Setter Property="BorderBrush" TargetName="border" Value="#FF3C7FB1"/>
                        </Trigger>
                        <Trigger Property="IsPressed" Value="True">
                            <Setter Property="Background" TargetName="border" Value="#FFC4E5F6"/>
                            <Setter Property="BorderBrush" TargetName="border" Value="#FF2C628B"/>
                        </Trigger>
                        <Trigger Property="ToggleButton.IsChecked" Value="True">
                            <Setter Property="Background" TargetName="border" Value="#FFBCDDEE"/>
                            <Setter Property="BorderBrush" TargetName="border" Value="#FF245A83"/>
                        </Trigger>
                        <Trigger Property="IsEnabled" Value="False">
                            <Setter Property="Background" TargetName="border" Value="#FFF4F4F4"/>
                            <Setter Property="BorderBrush" TargetName="border" Value="#FFADB2B5"/>
                            <Setter Property="TextElement.Foreground" TargetName="contentPresenter" Value="#FF838383"/>
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <!-- Buttons for contextual edition (delete and edit button) -->
    <Style TargetType="Button" x:Key="EditionButtonStyle">
        <Setter Property="BorderBrush" Value="{x:Null}" />
        <Setter Property="Width" Value="20" />
        <Setter Property="Height" Value="20" />
        <Setter Property="Foreground" Value="{x:Null}" />
        <Setter Property="Background" Value="{x:Null}"/>
    </Style>

    <!-- Buttons for contextual edition (delete and edit button) that supports text-->
    <Style TargetType="Button" x:Key="HeaderedEditionButtonStyle">
        <Setter Property="BorderBrush" Value="{x:Null}" />
        <Setter Property="Height" Value="32" />
        <Setter Property="Foreground" Value="Black" />
        <Setter Property="Background" Value="{x:Null}"/>
    </Style>

    <!-- Status bar item style -->
    <Style TargetType="StatusBarItem">
        <Setter Property="Background" Value="#FF465A7D"/>
        <Setter Property="Foreground" Value="White"/>
    </Style>

    <!-- Button used in the toolboxes (typically the Ok, cancel) -->
    <Style TargetType="{x:Type Button}" x:Key="ButtonToolBoxStyle">
        <Setter Property="Margin" Value="5"/>
        <Setter Property="Width" Value="75"/>
    </Style>

    <!-- Style for the footers of the toolboxes -->
    <Style TargetType="Border" x:Key="ToolBoxBorderStyle">
        <Setter Property="DockPanel.Dock" Value="Bottom"/>
        <Setter Property="Margin" Value="0,20,0,0"/>
        <Setter Property="BorderThickness" Value="0,0.5,0,0"/>
        <Setter Property="BorderBrush" Value="{DynamicResource ResourceKey={x:Static SystemColors.ActiveBorderBrushKey}}"/>
        <Setter Property="Background" Value="{DynamicResource ResourceKey={x:Static SystemColors.ControlBrushKey}}"/>
    </Style>

    <!-- Style for the popups -->
    <Style TargetType="Popup">
        <Setter Property="Placement" Value="Bottom"/>
        <Setter Property="StaysOpen" Value="False"/>
        <Setter Property="AllowsTransparency" Value="True"/>
    </Style>

    <SolidColorBrush Color="#003399" x:Key="TaskDialogMainInstructionBrush" PresentationOptions:Freeze="True" />
</ResourceDictionary>
